﻿namespace EntityAccessInterfaces;

public interface IDraftServices
{
    /// <summary>
    /// 添加地图标绘
    /// </summary>
    /// <param name="draft">要添加的地图标绘对象</param>
    /// <returns>如果成功，则返回地图标绘的ID。否则返回null</returns>
    Task<AddResult<int>> AddDraftAsync(Draft draft);

    /// <summary>
    /// 删除地图标绘
    /// </summary>
    /// <param name="draftID">要删除的地图标绘ID</param>
    /// <returns>操作结果</returns>
    Task<DeleteResult> DeleteDraftAsync(int draftID);

    /// <summary>
    /// 获取地图标绘（浅拷贝）
    /// </summary>
    /// <param name="draftID">要获取的地图标绘ID</param>
    /// <returns>地图标绘</returns>
    Task<GetResult<Draft>> GetDraftAsync(int draftID);

    /// <summary>
    /// 更新地图标绘
    /// </summary>
    /// <param name="draft">新的地图标绘对象</param>
    /// <returns>操作结果</returns>
    Task<AddResult<int>> UpdateDraftsAsync(Draft draft);

    /// <summary>
    /// 获取用户名下的所有地图标绘（浅拷贝）
    /// </summary>
    /// <param name="userAccount">用户账户</param>
    /// <returns>地图标绘列表</returns>
    Task<GetResult<List<Draft>>> GetRelativeDraftsAsync(int userAccount);

    /// <summary>
    /// 获取地图标绘的深拷贝
    /// </summary>
    /// <param name="draftID">要获取的地图标绘对象ID</param>
    /// <returns>查询结果</returns>
    Task<GetResult<Draft>> GetDeepCopyOf(int draftID);
}
